<template>
<div>
    {{nihao.count}}
    <button @click="haoa">按钮</button>
</div>

</template>
<script setup lang="ts">
import {useMainStore} from '../store'
const nihao= useMainStore()


const haoa =()=>{
    nihao.$patch({
        count:100
    })
}
</script>